#include<bits/stdc++.h>
using namespace std;
typedef unsigned u32;

u32 sd = time(0);
inline u32 rd() {
	sd ^= sd << 17, sd ^= sd >> 5, sd ^= sd << 23;
	return sd;
}

int n1 = 100, m1 = 100, n2 = 100, m2 = 100;
double x;
int main() {
	srand(time(0));
	cout << n1 << " " << m1 << endl;
	for(int i = 0; i < n1; ++i, cout << endl)
		for(int j = 0; j < m1; ++j)
			cout << rd() << " ";
	cout << n2 << " " << m2 << endl;
	for(int i = 0; i < n2; ++i, cout << endl)
		for(int j = 0; j < m2; ++j)
			cout << rd() << " ";
	cout << n1 << endl;
	for(int i = 0; i < n1; ++i) cout << rd() << " ";
	cout << n2 << endl;
	for(int i = 0; i < n1; ++i) cout << rd() << " ";
	cout << m1 << endl;
	for(int i = 0; i < n1; ++i) cout << rd() << " ";
	cout << m2 << endl;
	for(int i = 0; i < n1; ++i) cout << rd() << " ";
}
